import request from "@/utils/request";
// 报表

// 人员加钟点钟加班
export function getFinanceClock(data) {
  return request({
    url: "/order/finance/clock",
    method: "POST",
    data: data,
  });
}

// 月营业额汇总
export function getFinanceTurnover(data) {
  return request({
    url: "/order/finance/store/turnover",
    method: "POST",
    data: data,
  });
}

// 月营业额汇总统计
export function getFinanceTurnoverSum(data) {
  return request({
    url: "/order/finance/store/turnover/sum",
    method: "POST",
    data: data,
  });
}

// 手工业绩表
export function getUserperFormance(data) {
  return request({
    url: "/order/finance/user/performance",
    method: "POST",
    data: data,
  });
}

// 门店利润分析对比
export function getProfitAnalyse(data) {
  return request({
    url: "/order/finance/store/revenue",
    method: "POST",
    data: data,
  });
}

// 门店日报汇总
export function getStoreToday(data) {
  return request({
    url: "/order/finance/store/day/total",
    method: "POST",
    data: data,
  });
}

// 单店店长日报
export function getOnlyStoreToday(data) {
  return request({
    url: "/order/finance/store/day",
    method: "POST",
    data: data,
  });
}

// 门店日报汇总导出
export function getStoreTodayTotal(data) {
  return request({
    url: "/order/finance/store/day/total/exl",
    method: "POST",
    data: data,
    responseType: "blob",
  });
}

// 人员手工充卡统计
export function getTotalManual(query) {
  return request({
    url: "/order/award-total/total/manual",
    method: "get",
    params: query,
  });
}

// 查询数据是否是最新
export function CheckAllDataIsNew(query) {
  return request({
    url: "/order/award-total/check/all/data",
    method: "get",
    params: query,
  });
}

// 刷新所有未更新数据
export function getAllUnflushDataIs(query) {
  return request({
    url: "/order/award-total/flush/all/data",
    method: "get",
    params: query,
  });
}

// 利润费用明细
export function getStoreProfitCost(data) {
  return request({
    url: "/order/finance/ly/store/profit/cost",
    method: "POST",
    data: data,
  });
}

// 充消比
export function getTotalWriteOff(query) {
  return request({
    url: "/customer/account/total/write/off",
    method: "get",
    params: query,
  });
}

// 利润费用汇总
export function getProfitCostSum(data) {
  return request({
    url: "/order/finance/ly/store/profit/cost/sum",
    method: "post",
    data: data,
  });
}

// 业务数据分析
export function getBusinessCount(data) {
  return request({
    url: "/order/finance/ly/business/data/count",
    method: "post",
    data: data,
  });
}

// 利润费用月对比
export function getProfitCostContrast(data) {
  return request({
    url: "/order/finance/ly/store/profit/cost/moon/contrast",
    method: "post",
    data: data,
  });
}

// 利润率
export function getProfitMargin(data) {
  return request({
    url: "/order/finance/ly/store/profit/margin",
    method: "post",
    data: data,
  });
}

// 多月充消比汇总
export function getTotalMoons(data) {
  return request({
    url: "/customer/account/total/write/off/moons",
    method: "post",
    data: data,
  });
}

// 城市经理报表
export function getFinanceCity(data) {
  return request({
    url: "/order/finance/ly/city",
    method: "post",
    data: data,
  });
}

// 充卡折扣率
export function ChargeCardDiscount(data) {
  return request({
    url: "/order/finance/ly/chargeCardDiscount",
    method: "post",
    data: data,
  });
}

// 充卡营业额占比
export function chargeCardSo(data) {
  return request({
    url: "/order/finance/ly/chargeCardSo",
    method: "post",
    data: data,
  });
}

// 档位变化
export function GearChange(data) {
  return request({
    url: "/order/finance/ly/gear",
    method: "post",
    data: data,
  });
}

// 档位统计
export function GearTotal(data) {
  return request({
    url: "/order/finance/ly/gear/total",
    method: "post",
    data: data,
  });
}

// 档位变化统计
export function GearChangeTotal(data) {
  return request({
    url: "/order/finance/ly/gear/change/total",
    method: "post",
    data: data,
  });
}